//改文件专门创建整个应用的路由器
import VueRouter from "vue-router";
import About from "@/pages/About";
import Home from "@/pages/Home";
import news from "@/pages/news";
import message from "@/pages/message";
//创建一个路由器
export default new VueRouter({
  routes:[
    {
      path:'/about',
      component:About
    },
    {
      path:'/home',
      component:Home,
      //它的子路由
      children:[
        {
          //不需要加 /
          path:'news',
          component:news
        },
        {
          path:'message',
          component:message
        }
      ]
    }
  ]
})
